import { service as request, BasePath } from '../request'

/**
  * 获取所有车辆
  * @returns {Object} Promise
  */
export const getVehicleTypeByAll = () => request({
  url: `${BasePath}/vehicletype/byAll`,
  method: 'GET'
})

/**
  * 删除所选车辆类型
  * @returns {Object} Promise
  */
export const delVehicleTypeByID = (delID) => request({
  url: `${BasePath}/vehicletype/deleting?ids=${delID}`,
  method: 'GET'
})
/**
  * 创建车辆类型
  * @returns {Object} Promise
  */
export const addVehicleType = (data) => request({
  url: `${BasePath}/vehicletype/creating`,
  method: 'POST',
  data
})

/**
  * 修改车辆类型
  * @returns {Object} Promise
  */
export const editVehicleType = (data) => request({
  url: `${BasePath}/vehicletype/updating`,
  method: 'POST',
  data
})
